﻿using System;
using System.Collections.Generic;
using System.Linq;
using BackendServer.App_Data;

namespace BackendServer.Security
{
    class ServiceAuthorization : CustomAuthorizationTemplate
    {
        public const string UserRole = "user";
     
        protected override IEnumerable<string> GetUserRoles(System.Security.Principal.GenericIdentity gid)
        {
            try
            {
                return new List<string>() { UserRole };
            }
            catch (Exception)
            {
                return null;
            }
        }

        protected override bool ValidateUser(string name, string password)
        {
            return true;
        }
      
    }
}